package com.barneyx.mshinfoplatform.entity.info;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.barneyx.mshinfoplatform.entity.AreaCommonEntity;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableCharset;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableEngine;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "msh_info_settings", autoResultMap = true)
@TableCharset(MySqlCharsetConstant.UTF8MB4)
@TableEngine(value = MySqlEngineConstant.MyISAM)
@TableComment("消息修改历史表")
@Builder
@Slf4j
public class InfoSettingEntity extends AreaCommonEntity implements Serializable {
    @TableId(value = "info_setting_id", type = IdType.ASSIGN_ID)
    @Column(type = MySqlTypeConstant.BIGINT)
    private String InfoSettingId;

    @TableField("info_setting_code")
    private String InfoSettingCode;

    @TableField("info_setting_name")
    private String InfoSettingName;

    @TableField("info_setting_remark")
    private String InfoSettingRemark;


    @TableField(value = "info_setting_content", typeHandler = JacksonTypeHandler.class)
    @Column(type = MySqlTypeConstant.JSON)
    private JSONObject InfoSettingContent;


    @TableField("info_setting_val")
    @Column(type = MySqlTypeConstant.LONGTEXT)
    private String InfoSettingValue;


    public interface ISettingCode {
        final String ADV_SETTINGS = "ADV_SETTINGS"; //全局广告列表
        final String H5_TABBER = "H5_TABBER"; //基础底部导航列表
        final String AREA_SERVER_KQ_QRCODEIMG = "AREA_SERVER_KQ_QRCODEIMG"; //区域客服二维码
        final String AREA_GROUP_QRCODEIMG = "AREA_GROUP_QRCODEIMG"; //区域群二维码
        final String MP_QRCODEIMG = "MP_QRCODEIMG"; //公众号二维码


        final String H5_CLIENT_HOST = "H5_CLIENT_HOST"; //客户端域名


        final String USER_POST_ENABLE = "USER_POST_ENABLE"; //是否开启用户发布管理
        final String USER_POST_TYPE = "USER_POST_TYPE"; //用户发布类型
        final String USER_POST_PERIOD = "USER_POST_PERIOD"; //选项周期 1天  周  月  年
        final String USER_POST_PERIOD_VAL = "USER_POST_PERIOD_VAL"; //周期值


        final String INFO_STATE_AUDIT_ENABLE = "INFO_STATE_AUDIT_ENABLE"; //是否开启信息审核

        final String AREA_EMAIL_NOTIFY_ENABLE = "AREA_EMAIL_NOTIFY_ENABLE"; //是否开启地区审核通知
        final String AREA_EMAIL_NOTIFY_ADDR = "AREA_EMAIL_NOTIFY_ADDR"; //地区通知邮件地址

    }
}
